package MapBase.logic.control.MapBaseControl.Mouse
{
	/**
	 * 
	 */	
	import MapBase.logic.MapBase;
	import MapBase.logic.struct.GridCell;

	public class MapBaseGridLayer
	{
		public function MapBaseGridLayer()
		{
			
		}
		
		static public function MDownCMD(mapBase:MapBase,selectObjLayer:Boolean):void
		{
			if(!selectObjLayer)	return;	
			
			if(mapBase.grid)
			{
				
				var cellNode : GridCell = mapBase.getMouseGridCell();
				
				if(cellNode.cellX>=0 && cellNode.cellY>=0)
				{
					if(mapBase.grid.getNode(cellNode.cellX,cellNode.cellY))
					{
						mapBase.grid.setEndNode(cellNode.cellX,cellNode.cellY);
						mapBase.grid.setStartNode(1,1);
					}
				}
			}
		}
	}
}